# Copyright 2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2
# $Header: $

inherit kde-base

DATE=`date +"%y%m%d"`

DESCRIPTION="KDE UML Drawing Utility - CVS Snapshot"
SRC_URI="ftp://ftp.kde.org/pub/kde/snapshots/kdesdk-${DATE}.tar.bz2"
HOMEPAGE="http://www.umbrello.org"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"
IUSE=""

newdepend ">=kde-base/kdebase-3
	    sys-devel/flex"

need-kde 3

S=${WORKDIR}/kdesdk

src_unpack() {
	unpack ${A}
}

src_compile() {
	cd ${S}*
	export WANT_AUTOCONF_2_5=1
	make -f Makefile.cvs

	# Make it use Qt 3.1 (not 3.2)
	#cat configure | sed 's/kde_qtsubver=2/kde_qtsubver=1/g' > configure.new
	#mv configure.new configure
	#chmod 755 ./configure

	./configure --enable-debug=full
	cd umbrello
	emake
	cd ${S}*/doc/umbrello
	emake
}

src_install () {
	cd ${S}*/umbrello
	make DESTDIR=${D} install || die
	cd ${S}*/doc/umbrello
	make DESTDIR=${D} install || die
}



